x86/pv: Implement pv_hypercall() in C
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 26 Jan 2015 12:01:00 +0000 (12:01 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 Sep 2016 12:34:28 +0000 (13:34 +0100)
commit51e5d6c7a29640490eeab4e4c3d60b9c2d3d3054
tree80c2f6ed5783d3c3e3bed6ffb4ba69fa1d9a9930
parent5464f1210c6341762ca0457253adfa035ffe666c
x86/pv: Implement pv_hypercall() in C

In a similar style to hvm_do_hypercall().  The C version is far easier to
understand and edit than the assembly versions.

There are a few small differences however.  The register clobbering values
have changed (to match the HVM side), and in particular clobber the upper
32bits of 64bit arguments.  The hypercall and performance counter record are
reordered to increase code sharing between the 32bit and 64bit cases.

The sole callers of __trace_hypercall_entry() were the assembly code.  Given
the new C layout, it is more convenient to fold __trace_hypercall_entry() into
pv_hypercall(), and call __trace_hypercall() directly.

Finally, pv_hypercall() will treat a NULL hypercall function pointer as
-ENOSYS, allowing further cleanup.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hypercall.c
xen/arch/x86/trace.c
xen/arch/x86/x86_64/asm-offsets.c
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S